{#{% extends 'Base/main.content.lists.div.html.twig' %}#}
{#{% import 'Base/list_item.twig' as listItem %}#}
{% extends 'Back/Sano/list.creator.html.twig' %}
{% import 'Back/Sano/list.item.twig' as listItem %}
{#默认不能删除和新增#}
{% block addBtn %}{% endblock %}
{% block delBtn %}{% endblock %}
{% block tableHead %}
    <tr>
        <th align="" width="5%">选择</th>
        <th align="" width="">#</th>
        <th align="" width="">用户名</th>
        <th align="" width="">推荐人</th>
        <th align="" width="">直推团队</th>
{#        <th align="" width="">{{config.password.label}}</th>#}
{#        <th align="" width="">{{config.apiToken.label}}</th>#}
        <th align="" width="">手机号</th>
        <th align="" width="">头像</th>
{#        <th align="" width="">{{config.parent.label}}</th>#}
{#        <th align="" width="">{{config.auth.label}}</th>#}
{#        <th align="" width="">{{config.shop.label}}</th>#}
        <th align="" width="">{{config.createAt.label}}</th>
        <th align="center" width="8%">禁止访问</th>
    </tr>
{% endblock %}
{% block tableList %}
    {% for Entity in lists %}
        <tr>
            <td align='' width=''>
                <span class="checkall"><input lay-skin="primary" type="checkbox" name="ids[]" value="{{ Entity.id }}"/></span>
            </td>
            <td align='' width='' id='name_{{ Entity.id }}'>
                {{ listItem.text('id',Entity.id,Entity.id) }}
            </td>
            <td align='' width='' id='name_{{ Entity.id }}'>
                {{ listItem.text('name',Entity.name,Entity.id) }}
            </td>
            <td align='' width='' id='roles_{{ Entity.id }}'>
                <div>{{ listItem.text('parent',Entity.parent,Entity.id) }}</div>
            </td>
            <td align='' width='' id='roles_{{ Entity.id }}'>
                <div>
                    {% for index,item in Entity.sons %}
                        <p class="sons_{{ Entity.id }}  {{ index>4?'hidden':'' }}">{{ listItem.text('parent',item,Entity.id)   }}</p>
                    {% endfor %}
                    {% if Entity.sons|length > 5 %}
                        <p><a href="javascript:$('.sons_{{ Entity.id }}').show();">查看更多(共{{ Entity.sons|length }}人)</a></p>
                    {% else %}

                    {% endif %}
                </div>
            </td>
{#            <td align='' width='' id='password_{{ Entity.id }}'>#}
{#                {{ listItem.text('password',Entity.password,Entity.id) }}#}
{#            </td>#}
{#            <td align='' width='' id='apiToken_{{ Entity.id }}'>#}
{#                {{ listItem.text('apiToken',Entity.apiToken,Entity.id) }}#}
{#            </td>#}
            <td align='' width='' id='phone_{{ Entity.id }}'>
                {{ listItem.text('phone',Entity.phone,Entity.id) }}
            </td>
            <td align='' width='' id='avatar_{{ Entity.id }}'>
                {{ listItem.pic('avatar',Entity.avatar,Entity.id) }}
            </td>
{#            <td align='' width='' id='parent_{{ Entity.id }}'>#}
{#                {{ listItem.text('parent',Entity.parent,Entity.id) }}#}
{#            </td>#}
{#            <td align='' width='' id='auth_{{ Entity.id }}'>#}
{#                {{ listItem.text('auth',Entity.auth,Entity.id) }}#}
{#            </td>#}
{#            <td align='' width='' id='shop_{{ Entity.id }}'>#}
{#                {{ listItem.text('shop',Entity.shop,Entity.id) }}#}
{#            </td>#}
            <td align='' width='' id='createAt_{{ Entity.id }}'>
                {{ listItem.day('createAt',Entity.createAt,Entity.id) }}
            </td>
            <td align='' width=''>
{#                {{ listItem.edit('User','',Entity.id) }}#}
                <div>{{ listItem.switch('status',Entity.status,Entity.id) }}</div>
                <div>{{ Entity.status?"已拉黑":"正常" }}</div>
            </td>
        </tr>
    {% endfor %}
{% endblock %}
{% block script %}
{% endblock %}

